package com.ncmmall.domain.business.distribution;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ncmmall.domain.security.user.WebUser;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * 分销商审核
 *
 * @author Samuel
 * @date 2020-08-24 20:19
 */
@Entity
@Table(name = "distribution_check")
@Access(AccessType.FIELD)
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class DistributionCheck {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 用户
     */
    @OneToOne
    @JsonIgnore
    private WebUser member;

    /**
     * 申请的等级
     */
    @OneToOne
    @JsonIgnore
    private DistributorLevel distributorLevel;

    /**
     * 推荐人id
     */
    private Long distributorId;

    /**
     * 审核状态
     * 1、待审核
     * 2、审核通过
     * 3、审核不通过
     */
    private int checkStatus;

    /**
     * 审核通过 激活状态
     */
    private boolean activationFlag;

    /**
     * 审核备注
     */
    private String checkNote;

    /**
     * 创建时间
     */
    private Timestamp createTime;

    /**
     * 审核时间
     */
    private Timestamp checkTime;
}
